package vue;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import mappers.MapperClient;


public class Simulation extends JDialog {

	private static Simulation simu;

	private final JPanel contentPanel = new JPanel();
	private MapperClient control;
	protected JButton btnSimulerOk;
	protected JButton btnSimulerPasOk;

	public static Simulation getSimulation(MapperClient p_control){
		Simulation mySimu;
		if (simu != null){
			simu = new Simulation(p_control);
			mySimu = simu;
		}else{
			mySimu = null;
		}
		return mySimu;
	}


	/**
	 * Create the dialog.
	 */
	protected Simulation(MapperClient p_control)
	{
		control = p_control;
		setResizable(false);
		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 300, 120);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);

		btnSimulerOk = new JButton("Simuler OK");
		btnSimulerOk.setBounds(10, 37, 109, 23);
		contentPanel.add(btnSimulerOk);

		btnSimulerPasOk = new JButton("Simuler Refus");
		btnSimulerPasOk.setBounds(150, 37, 130, 23);
		contentPanel.add(btnSimulerPasOk);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
		}
	}

}
